Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Control the RDF output format manually #277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

berezovskyi
Copy link
Contributor

@berezovskyi berezovskyi commented Jun 25, 2022

Description

Map RDF language to an exact format needed by https://jena.apache.org/documentation/io/rdf-output.html. This PR maps regular XML/RDF to RDFXML_PLAIN, which is NOT rdf/xml-ABBREV, unless ABBREV is chosen specifically:

https://github.com/eclipse/lyo/blob/b-jena-format-spec/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/AbstractOslcRdfXmlProvider.java#L152-L158

Potentially, allow for more RDF/XML config as per https://jena.apache.org/documentation/io/rdfxml_howto.html

Checklist

  • This PR adds an entry to the CHANGELOG. See https://keepachangelog.com/en/1.0.0/ for instructions. Minor edits are exempt.
  • This PR was tested on at least one Lyo OSLC server or adds unit/integration tests.
  • This PR does NOT break the API

Issues

https://forum.open-services.net/t/doors-lyo-incompatibility/631/5

@berezovskyi
Copy link
Contributor Author

@jadelkhoury need your help here.

I just tested this PR on both refimpl and lyo-samples (against two live Jazz servers, which is relevant because this PR was trying to fix an issue for DNG).

lyo-samples build went just fine: https://github.com/OSLC/lyo-samples/actions/runs/4703021261/jobs/8341007496

But the refimpl fails in https://github.com/oslc-op/refimpl/actions/runs/4703012037/jobs/8340986025#step:7:224 due to a bunch of class-not-found errors:

image

There is no way this PR introduces this problem. Could you please check if this should be happening and where the fix is needed?

@berezovskyi
Copy link
Contributor Author

Scratch that, I just realized this branch has not been rebased for quite a while and master works just fine.

Refimpl test against lyo@b-jena-format-spec works fine after rebase: https://github.com/oslc-op/refimpl/actions/runs/4703438070/jobs/8341937611

The sample code for lyo-client still tests fine against 2 ELM installs: https://github.com/OSLC/lyo-samples/actions/runs/4703456458/jobs/8341977320

But hey, it was a good test of my new semi-automatic PR testing flow!

@berezovskyi berezovskyi added this to the 5.1 milestone Apr 14, 2023
@berezovskyi berezovskyi changed the title Control the output format manually Control the RDF output format manually Apr 14, 2023
@github-actions github-actions bot force-pushed the b-jena-format-spec branch 6 times, most recently from 3e44a71 to 14fee00 Compare May 2, 2023 07:43
@github-actions github-actions bot force-pushed the b-jena-format-spec branch 2 times, most recently from dddd698 to fae096f Compare May 24, 2023 07:43
@berezovskyi
Copy link
Contributor Author

berezovskyi commented Jun 13, 2023

While I didn't see any breaking effect from the PR (labelling Breaking anyway, in case someone depends on this, cf. Hyrum's law), let's keep it until Lyo 6.0. I think we can aim for 6.0 release around Christmas because Jena plans to drop JDK 11 support in the fall and we will likely have to catch up before 2024.

@berezovskyi berezovskyi modified the milestones: 5.1, 6.0 Jun 13, 2023
@berezovskyi
Copy link
Contributor Author

Additionally, I think it would be good to add a switch (JVM property, potentially) to control pretty/fast output format. E.g. we could use RDFXML_PLAIN for performance/production and RDFXML_PRETTY for debug (same for TURTLE_BLOCKS vs TURTLE_PRETTY). I had this thought before but didn't want to consider breaking changes but now it's worth to revisit since we retarget the PR for 6.0.

@github-actions github-actions bot force-pushed the b-jena-format-spec branch 4 times, most recently from 9b1d7ba to 60946b8 Compare June 21, 2023 07:43
@berezovskyi berezovskyi changed the title Control the RDF output format manually feat: Control the RDF output format manually Jun 30, 2023
@github-actions github-actions bot force-pushed the b-jena-format-spec branch 2 times, most recently from 4ef534e to 51cb26d Compare July 14, 2023 07:43
@github-actions github-actions bot force-pushed the b-jena-format-spec branch 2 times, most recently from b2cfc91 to 3a3f805 Compare August 5, 2023 07:43
Signed-off-by: Andrew Berezovskyi <[email protected]>
Copy link

sonarcloud bot commented May 23, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 30%)

See analysis details on SonarCloud

2 similar comments
Copy link

sonarcloud bot commented Jun 22, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 30%)

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Sep 19, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 30%)

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant